package com.lorenzogao.customview


import android.os.Bundle

import com.lorenzogao.customviewexample.R
import kotlinx.android.synthetic.main.activity_city_load.*

import kotlinx.android.synthetic.main.layout_head.*
import java.util.*

class CityLoadActivity : BaseActivity() {


    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_city_load)

        setToolBar(toolbar, "58同城数据切换")

        btnStart.setOnClickListener {
            loadStart()
        }
    }

    private fun loadStart() {
        Timer().schedule(object : TimerTask() {
            override fun run() {
                runOnUiThread {
                    cityLoadView.exchange()
                }
            }

        }, 0, 1000)
    }


}
